import pygal
from die import Die

die = Die()
lines = []
line_nums = []

for roll_num in range(1000):
    line = die.roll()
    lines.append(line)

for value in range(1, die.num_sides+1):
    line_num = lines.count(value)
    line_nums.append(line_num)

print(line_nums)

hist = pygal.Bar()
hist.title = 'D6 1000 times'
hist.x_labels = [i for i in range(1, 7)]
hist.add('D6', line_nums)
hist.render_to_file('die.svg')